added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2010 / VBWebBrowserAutomation / HtmlText.vb
blob1b086c15a48e5e4fdbead0ffff17ec21e1f85fd9
1 '*************************** Module Header ******************************'
2 ' Module Name: HtmlText.vb
3 ' Project: VBWebBrowserAutomation
4 ' Copyright (c) Microsoft Corporation.
5 '
6 ' This class HtmlText represents an HtmlElement with the tag "input" and its
7 ' type is "text".
8 '
9 ' This source is subject to the Microsoft Public License.
10 ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11 ' All other rights reserved.
13 ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
14 ' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
15 ' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
16 '*************************************************************************'
18 Imports System.Security.Permissions
20 Public Class HtmlText
21 Inherits HtmlInputElement
23 Public Property Value() As String
25 ''' <summary>
26 ''' This parameterless constructor is used in deserialization.
27 ''' </summary>
28 Public Sub New()
29 End Sub
31 ''' <summary>
32 ''' Initialize an instance of HtmlText. This constructor is used by
33 ''' HtmlInputElementFactory.
34 ''' </summary>
35 <PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")>
36 Public Sub New(ByVal element As HtmlElement)
37 MyBase.New(element.Id)
38 Value = element.GetAttribute("value")
39 End Sub
41 ''' <summary>
42 ''' Set the value of the HtmlElement.
43 ''' </summary>
44 <PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")>
45 Public Overrides Sub SetValue(ByVal element As HtmlElement)
46 element.SetAttribute("value", Value)
47 End Sub
48 End Class